home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
08 System Utilities
/
DISKDR.BIN
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
4KB
|
103 lines
10 POKE53280,0:POKE53281,0:REM == == CIS 1-86 MOD PA RAY 2-86 ==
12 PRINT"[147][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":PRINT"[158]DISK MENU UTILITY 2"
14 PRINT"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":PRINT"[155] PRESS RETURN"
16 GETG$:IFG$<>CHR$(13)THEN16
18 DIMCA$(2,144),MN$(13):FORI=1TO12:READMN$(I):NEXT
20 DATA"[154] NEXT PAGE ","[154] CHANGE DISK ","[154] ERROR STATUS "," [154]LOAD,8:RUN "
22 DATA"[154] LOAD,8,1 ","[150] RENAME FILE ","[150] DELETE FILE ","[150] VALIDATE DISK "
24 DATA"[150] FORMAT/CLEAR DISK ","[150] QUIT "," NEXT PAGE "," CANCEL COMMAND "
26 GOSUB46:GOTO30
28 POKE214,X:PRINT:POKE211,Y:RETURN
30 Y=4:FORI=1TO10:X=I+12:GOSUB28:PRINTMN$(I):NEXT:X=13+(1ANDDA<12)
32 GOSUB28:PRINT"";MN$(X-12):FORI=1TO10:GETX$:NEXT
34 GETX$:IFX$=""THEN34
36 GOSUB28:PRINT"[146]"MN$(X-12):IFX$=""THENX=X+1:IFX>22THENX=13+(1ANDDA<12)
38 IFX$="[145]"THENX=X-(1ANDX>13):IF(DA<12)ANDX=13THENX=14
40 IFX$=CHR$(13)THEN44
42 GOTO32
44 ON(X-12)GOSUB144,46,120,110,116,98,104,90,74,86:GOTO30
46 PRINT"[147]READING DIRECTORY"
48 DA=0:OPEN1,8,0,"$":POKE781,1:SYS65478:GETA$,B$
50 GETA$,B$,A$,B$:C=0:IFA$<>""THENC=ASC(A$)
52 IFB$<>""THENC=C+ASC(B$)*256
54 DA=DA+1:CA$(1,DA)=MID$(STR$(C),2)
56 GETB$:IFST<>.THEN68
58 IFB$<>CHR$(34)THEN56
60 GETB$:IFB$=CHR$(32)THEN60
62 C$=C$+B$:GETB$:IFB$<>""THEN62
64 CA$(2,DA)=C$:C$="":IFDA=1THENPRINT"[147]READING "CHR$(34)+CA$(2,DA)
66 IFST=.THEN50
68 SYS65484:CA$(2,DA)="[153] BLOCKS FREE "+STR$(DA-2)+" FILES [146]":CLOSE1:T=1
70 GOSUB120:IFA<>.THENDA=0:RETURN
72 GOSUB144:RETURN
74 WM$="[150]PRESENT CONTENTS OF DISK WILL BE ERASED":GOSUB130
76 PRINT"[147][150]INSERT DISK TO BE FORMATED":N$="":INPUT"DISK NAME";N$:IFN$=""THENRETURN
78 EX$="":PRINT"TO FORMAT DISK ENTER DISK NUMBER"
80 PRINT"OR PRESS RETURN TO CLEAR DIRECTORY";:INPUTEX$
82 MA$="N:"+N$:IFEX$<>""THENMA$=MA$+","+EX$
84 OPEN15,8,15,MA$:CLOSE15:MA$="":GOSUB120:GOSUB48:RETURN
86 X$="":INPUT"[147]ARE YOU SURE (Y/N) ";X$:IFX$="Y"THENPRINT"[147]":END
88 T=OT-1:GOSUB142:RETURN
90 IFDA=.THENRETURN
92 WM$="RANDOM FILES WILL BE ERASED":GOSUB130:PRINT"[147]DOING MY BEST..."
94 CP=VAL(CA$(1,DA)):OPEN15,8,15:PRINT#15,"V":CLOSE15
96 GOSUB120:GOSUB48:CP=VAL(CA$(1,DA))-CP:PRINT""CP"BLOCKS RECLAIMED":RETURN
98 WC$="[150]":WM$="[150]RENAME":GOSUB160:IFN$=""THENRETURN
100 NW$="":PRINT"[147]NEW NAME FOR [150]"N$"":INPUTNW$:IFNW$=""THENT=OT-1:GOSUB144:RETURN
102 MA$="R:"+NW$+"="+N$:OPEN15,8,15,MA$:CLOSE15:MA$="":GOSUB120:GOSUB48:RETURN
104 WC$="[150]":WM$="[150]DELETE":GOSUB160:IFN$=""THENRETURN
106 WM$=""+N$+" [150]WILL BE ERASED":GOSUB130
108 MA$="S:"+N$:OPEN15,8,15,MA$:CLOSE15:MA$="":GOSUB120:GOSUB48:RETURN
110 WC$="[154]":WM$="[154]LOAD,8:RUN":GOSUB160:IFN$=""THENRETURN
112 POKE53272,21:PRINT"[147]LOAD"CHR$(34)N$CHR$(34)",8
114 [153]"":[151]198,4:[151]631,13:[151]632,82:[151]633,213:[151]634,13:[128]
116 WC$[178]"CONT":WM$[178]"CONTLOAD,8,1":[141]160:[139]N$[178]""[167][142]
118 [151]53272,21:[153]"LOADLOAD"[199](34)N$[199](34)",8,1":[153]"":[151]198,4:[151]631,13:[128]:[142]
120 [159]1,8,15:[132]1,A,B$,C,D:[160]1:[153]"#";A;B$;" TRK";C"SCT";D:[139]A[178]0[167][142]
122 [153]" PRESS RETURN TO CONTINUE
124 GETX$:IFX$=""THEN124
126 IFX$=CHR$(13)THENRETURN
128 GOTO124
130 PRINT"[147]":POKE214,5:PRINT:X=LEN(WM$):X=(40-X)/2:PRINTTAB(X);WM$
132 PRINT"";TAB(10);"PRESS [150]RETURN TO DO":PRINT;TAB(10);"PRESS [150]F1 TO CANCEL
134 [161]X$:[139]X$[178]""[167]134
136 [139]X$[178][199](13)[167][153]"LOAD":[142]
138 [139]X$[178]"INPUT"[167]T[178]OT:[141]144:[137]30
140 [137]134
142 [143]
144 [139]DA[178].[167][142]
146 G[178]0:OT[178]T[170]1:[153]" LOADPRINT "[199](34)[170]CA$(2,1)[170]"WAIT
148 T=T+1:G=G+1:PRINT""+CA$(1,T);:IFT<>DATHENPRINTTAB(4);CHR$(34)+CA$(2,T)
150 IFT=DATHENPRINTTAB(4);CA$(2,T)
152 TL=T:IFG=10ANDT=DATHENT=1:RETURN
154 IFG=10THEN:RETURN
156 IFT=DATHENT=1:RETURN
158 GOTO148
160 T=1:N$="":IFDA<3THENRETURN
162 T=OT-1:GOSUB144:GOTO188
164 IFOT+X-2=DATHEN188
166 GOSUB186:PRINT""+WC$+CHR$(34)+CA$(2,OT+X-2):FORI=1TO10:GETX$:NEXT
168 GETX$:IFX$=""THEN168
170 GOSUB186:PRINT"[146]"CHR$(34)+CA$(2,OT+X-2):IFX$=""THENX=X+1:IFX>11THEN188
172 IFX$="[145]"THENX=X-1:IFX<2THEN188
174 IFX-OT=TLTHEN188
176 IFX$=CHR$(13)THEN180
178 GOTO164
180 FORI=1TOLEN(CA$(2,OT+X-2)):IFMID$(CA$(2,OT+X-2),I,1)=CHR$(34)THEN184
182 NEXT
184 N$=LEFT$(CA$(2,OT+X-2),I-1):RETURN
186 POKE214,X:PRINT:POKE211,Y:RETURN
188 Y=4:FORX=13TO14:GOSUB186:PRINTWC$+MN$(X-2):NEXT
190 X=16:Y=6:GOSUB186:PRINT"CHOOSE FILE TO "WC$+WM$+"":X=13:Y=4
192 GOSUB186:PRINTWC$+""+MN$(X-2):FORI=1TO15:GETX$:NEXT
194 GETX$:IFX$=""THEN194
196 GOSUB186:PRINTWC$+"[146]"+MN$(X-2):IFX$=""THENX=X+1:IFX>14THENX=2:GOSUB208:GOTO164
198 IFX$="[145]"THENX=X-1:IFX<13THENX=TL-OT+1+(1ANDTL<>DA):GOSUB208:GOTO164
200 IFX$=CHR$(13)THENGOTO204
202 GOTO192
204 IFX=13THENGOSUB144:GOTO188
206 IFX=14THENT=OT-1:GOSUB144:RETURN
208 FORI=13TO14:POKE214,I:PRINT:POKE211,Y:PRINT" ":NEXT:RETURN
210 END
212 :